from django.db import models

class Meeting(models.Model):
    code =                  models.CharField(max_length = 8, blank=False, unique=True)
    date =                  models.DateField(auto_now=True, blank=False)
    time =                  models.TimeField(blank = False)
    type =                  models.CharField(max_length=50, blank=False)
    preacher =              models.ForeignKey('Preacher')
    sermonTopic =           models.CharField(max_length=100)
    sermonKeyWords =        models.CharField(max_length=200)
    worshipLeader =         models.CharField(max_length=80)
    worshipTopic =          models.CharField(max_length=100)
    soundPerson =           models.ForeignKey('SoundPerson')
    computerOperator =      models.ForeignKey('ComputerOperator')
    interpreter =           models.ForeignKey('Interpreter')
    interpretationType =    models.SmallIntegerField()
    church =                models.ForeignKey('Church')

    def __unicode__(self):
        return code, date, type

    class Meta:
        app_label = 'GUI'